pub fn normal_9() {
    for i in 1..10 {
        for j in 1..i+1 {
            print_9(j, i, false);
            // let r = i*j;
            // print!("    {} * {} = {}", j, i , r);
            // if r < 10 && j != 1 {
            //     print!(" ");                
            // }
        }
        println!();
    }
}

pub fn fire_9() {
    for i in (1..10).rev() {
        for j in 1..i+1 {
            print_9(j, i, false);
            // let r = i*j;
            // print!("    {} * {} = {}", j, i , r);
            // if r < 10 && j != 1 {
            //     print!(" ");                
            // }
        }
        println!();
    }
}

pub fn water_9() {
    for i in 1..10 {
        for j in i..10 {
            print_9(i, j, true);
            // let r = i*j;
            // print!("    {} * {} = {}",  i ,j, r);
            // if r < 10 {
            //     print!(" ");                
            // }
        }
        println!();
    }
}

pub fn electric_9() {
    for i in (1..10).rev() {
        for j in i..10 {
            print_9(i, j, true);
            // let r = i*j;
            // print!("    {} * {} = {}", i ,j, r);
            // if r < 10 {
            //     print!(" ");                
            // }
        }
        println!();
    }
}

pub fn grass_9() {
    for i in 1..10 {
        for j in (1..i+1).rev() {
            print_9(i, j, false);
            // let r = i*j;
            // print!("    {} * {} = {}",  i ,j, r);
            // if r < 10 && j != 1 {
            //     print!(" ");                
            // }
        }
        println!();
    }
}

pub fn ice_9() {
    for i in (1..10).rev() {
        for j in (1..i+1).rev() {
            print_9(i, j, false);
            // let r = i*j;
            // print!("    {} * {} = {}",  i,j , r);
            // if r < 10 && j != 1 {
            //     print!(" ");                
            // }
        }
        println!();
    }
}

pub fn fighting_9() {
    for i in 1..10 {
        for j in (i..10).rev() {
            print_9(j, i, false);
            // let r = i*j;
            // print!("    {} * {} = {}", j, i , r);
            // if r < 10 {
            //     print!(" ");                
            // }
        }
        println!();
    }
}

pub fn poison_9() {
    for i in (1..10).rev() {
        for j in (i..10).rev() {
            print_9(j, i, false);
        }
        println!();
    }
}

fn print_9(j: i32, i: i32, b: bool) {
    let r = i*j;
    print!("    {} * {} = {}", j, i , r);
    if r < 10 {
        if b {
            print!(" ");                
        } else if j != 1 {
            print!(" ");                
        }
    }
}